import React, { Component } from 'react';
import Message from './Message';
import News from './News';
import MyNaviLink from '../MyNaviLink';
import { Route,Switch,Redirect}  from 'react-router-dom';

export default class Home extends Component {
    render() {
        return (
            
            <div>
               
                <h3>我是home的内容</h3>
                <div>
                <ul className="nav nav-tabs">
                <li>
                    {/* <a className="list-group-item" href="./home-news.html">News</a> */}
                    <MyNaviLink to="/home/news">News</MyNaviLink>
                </li>
                <li>
                    {/* <a className="list-group-item active" href="./home-message.html">Message</a> */}
                    <MyNaviLink to="/home/message">Message</MyNaviLink>
                </li>
                </ul>
                    <Switch>
                        <Route path="/home/news" component={News}/>
                        <Route path="/home/message" component={Message}/>
                        <Redirect to="/home/news"/>
                    </Switch>
              
             
            </div>
          
          </div>
        );
    }
}

